from langchain.llms import OpenAI
from PyCmpltrtok.common import sep

if '__main__' == __name__:
    
    llm = OpenAI(
        streaming=True,
        verbose=True,
        callbacks=[],
        openai_api_key="token1",
        openai_api_base=f"http://127.0.0.1:6001/v1",
        model_name="chatglm2-6b",
        temperature=1.0,
        openai_proxy=None,
        top_p=1.0,
    )

    text = "What would be a good company name for a company that makes colorful socks?"
        
    xresult = llm.invoke(text)
    sep()
    print(xresult)
    sep()
